#include "shallow-water.hh"
#include <map>
#include <math.h>

namespace Dune {
  namespace Equation {
    ShallowWater_<1>::ShallowWater_(Dune::ParameterTree& ptree){
      set_equ_paras(ptree);
    }
    ShallowWater_<2>::ShallowWater_(Dune::ParameterTree& ptree){
      set_equ_paras(ptree);
    }
    ShallowWater_<1>::~ShallowWater_(){
    }
    ShallowWater_<2>::~ShallowWater_(){
    }
    void ShallowWater_<1>::set_equ_paras(Dune::ParameterTree& ptree) {
      varname.push_back("density");
      varname.push_back("velocity1");
      set_equ_para("rho0",0.0);
      set_equ_para("u0",0.0);
    }
    void ShallowWater_<2>::set_equ_paras(Dune::ParameterTree& ptree) {
      varname.push_back("density");
      varname.push_back("velocity1");
      varname.push_back("velocity2");
      set_equ_para("rho0",0.0);
      set_equ_para("u0",0.0);
      set_equ_para("v0",0.0);
    }

    double ShallowWater_<1>::local_max_eigenvalue(double* var){
      return 0.0;
    }
    double ShallowWater_<2>::local_max_eigenvalue(double* var){
      return 0.0;
    }
    
    void ShallowWater_<1>::get_equation_flux(int whichdim, double* fequ, double* var){
      get_1d_fx(fequ,var);
    }
    void ShallowWater_<2>::get_equation_flux(int whichdim, double* fequ, double* var){
      if(whichdim==0)
        get_2d_fx(fequ,var);
      if(whichdim==1)
        get_2d_fy(fequ,var);
    }
    
    void ShallowWater_<1>::get_1d_fx(double* fequ, double* var){
    }
    void ShallowWater_<2>::get_2d_fx(double* fequ, double* var){
    }
    void ShallowWater_<2>::get_2d_fy(double* fequ, double* var){
    }
    
  } // Equation
} // Dune
